import 'package:flutter/material.dart';
import 'package:testflutte/relsease/TimerWidget.dart';
import 'package:fluttertoast/fluttertoast.dart';

void main() => runApp(Myapp());

class Myapp extends StatefulWidget {
  @override
  _LoginFormCodeState createState() => _LoginFormCodeState();
}

class _LoginFormCodeState extends State<Myapp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "验证码",
      home: Scaffold(
        appBar: AppBar(
          title: Text("验证码"),
          centerTitle: true,
        ),
        body: TimerWidget(
          startCountAction: _start,
        ),
      ),
    );
  }

  void _start(BuildContext context) {
    Fluttertoast.showToast(msg: '发送验证码');
  }
}
